package com.qingzhuge.member;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author : zero.xiao
 * @description :
 * @date :2018/9/21 0021 下午 18:02
 * @modified :
 * @since : 1.0.0
 */
@SpringBootApplication(scanBasePackages = {"com.qingzhuge"})
@EntityScan({"com.qingzhuge.*.entity"})
@EnableJpaRepositories(basePackages = {"com.qingzhuge.*.dao"})
@EnableTransactionManagement
@EnableCaching
@EnableJpaAuditing
public class MemberApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(MemberApplication.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(MemberApplication.class);
    }
}
